package com.xiaoshuidi.cloud.module.rooms.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.xiaoshuidi.cloud.module.rooms.controller.admin.map.vo.RoomStreetLatlonResp;
import com.xiaoshuidi.cloud.module.rooms.pojo.RoomStreetLatlon;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 区域街道经纬度 Mapper 接口
 * </p>
 *
 * @author hans.zhang
 * @since 2023-05-21
 */
public interface RoomStreetLatlonMapper extends BaseMapper<RoomStreetLatlon> {
    @Select("SELECT b.`name` as pname, a.* FROM room_street_latlon a " +
            "LEFT JOIN room_street_latlon b ON a.pid = b.id " +
            "WHERE a.`level` = 3")
    List<RoomStreetLatlonResp> getRoomStreetLatlon(@Param("ew") QueryWrapper<?> wrapper);
}
